import apiService from '@/http/request'

enum EnumApi {
    GET_BILLS = '/react/roleList',
    UPDATE_PERMISSIONS = '/react/updatePermissions',
    ADDRULE = '/react/addRole',
    EDITRULE = '/react/editRole',
}
// 获取角色列表
export const getRuleListApi = (data) => {
    return apiService.post(EnumApi.GET_BILLS, data)
}
// 更新角色权限
export const updatePermissionsApi = (data) => {
    return apiService.post(EnumApi.UPDATE_PERMISSIONS, data)
}
// 新增角色
export const addRoleApi = (data) => {
    return apiService.post(EnumApi.ADDRULE, data)
}
// 编辑角色
export const editRoleApi = (data) => {
    return apiService.post(EnumApi.EDITRULE, data)
}
// 获取完整的权限树
export const getAllPermissionsApi = () => {
    return apiService.get('/react/menutree')
}
